<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<view class="flexce" >
			<view class="row-in">
				<input type="text" placeholder="请输入用户名" v-model="use.user" />
			</view>
			<view class="row-in">
				<input type="number" placeholder="请输入密码" v-model="use.password" />
			</view>
			<view>
				<view class="btn" @click="gologin">登录</view>
			</view>
		</view>
		<!-- <view class="home">
			<view><blueLoading ></blueLoading></view> 
		</view> -->
	</view>
</template>

<script>
	import Vue from 'vue';
	let app = getApp()
	import blueLoading from '@/components/blueLoading.vue'
	export default Vue.extend({
		components:{
			blueLoading
		},
		data() {
			return {
				title: 'Hello',
				use:{
					'user':'15548195411',
					'password':'111111',
				}
			}
		},
		onLoad() {

		},
		methods: {
			gologin(){
				if(this.use.user === '15548195411'  )
				{
					if(this.use.password ==='111111'  )
					{
						uni.setStorageSync('mobile',this.use.user)
						uni.setStorageSync('password',this.use.password)
						uni.navigateTo({
							url:'../start-game/start-game'
						})
					}
				}
				
			}
		}
	})
</script>

<style scoped>
	.btn{
		background-color: #51b7ff;
		margin: 30rpx;
		padding: 10rpx 40rpx;
		border-radius: 40rpx;
		color: white;
	}
	.btn:hover{
		background-color: #2990ff;
		margin: 30rpx;
		padding: 10rpx 40rpx;
		border-radius: 40rpx;
		color: white;
	}
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	.row-in{
		margin: 30rpx;
		border: 1rpx solid #b9d8f2;
		padding: 10rpx 30rpx;
		border-radius: 40rpx;
		background-color: #f1f1f1;
	}
	.home{
		display: grid;
		grid-template-columns: repeat(2,1fr);
		grid-template-rows: repeat(3,1fr);
		height: 100%;
		justify-items: center;
		align-items: center;
		max-width: 800rpx;
		margin: 0 auto;
	}
	.home>view{
		transform: scale(1.5);
	}
	
</style>
